package com.gg.hj.service;

import com.gg.common.pojo.SysUsers;
import com.gg.hj.search.SysRolesSearch;
import com.gg.hj.search.SysUsersSearch;
import com.gg.hj.view.SysRolesView;

import java.util.List;


public interface SysUsersService {
    /**
     * 用户登录
     * @param loginId
     * @return SysUsers
     */
    SysUsers loginService(String loginId);
    /**
     * TODO 用户信息查询
     * @return SysUsers
     * @throws Exception
     */
    SysUsersSearch<SysUsers> queryUserAllService(SysUsersSearch<SysUsers> sysUsersSearch) throws Exception;


    /**
     * 根据登入人主键查询具有的角色
     * @param userId
     * @return SysRoles
     * @throws Exception
     */
    SysRolesSearch<SysRolesView> searchQueryByIdRoleService(SysRolesSearch<SysRolesView> sysRolesSearch) throws Exception;

    /**
     * 授权 或 回收 角色
     * @param id
     * @param checks
     * @param noChecks
     * @return int
     * @throws Exception
     */
    int AuthorizeOrRecycleRolesService(int id,int[] checks,int[] noChecks) throws Exception;

    /**
     * 查询账号是否存在
     * @param account
     * @return SysUsers
     * @throws Exception
     */
    SysUsers searchQueryUsersAccountService(String account) throws Exception;

    /**
     * 添加用户账号信息
     * @return int
     */
    int insertSelectiveService(SysUsers sysUsers) throws Exception;

    /**
     *  更新个人资料
     * @param sysUsers
     * @return  int
     * @throws Exception
     */
    int updateAccountService(SysUsers sysUsers) throws Exception;

}
